#include<iostream>
#include<memeory>
using namespace std;
class Computer
{
public:
Computer()
{
}
void serBoard(const string &borad)
{
   _board=borad;

}
void setdisplay(string &display)
{

 _display=display;
}
void setos();


protected:
string _board;
string _display;
string _os;

};



class  MacBook:public Computer{
public:
void setos() override{
   _os="mac os x12";

}

};

class Builder{

virtual void buildBoard(const string &board)=0;
virtual void buildDisplay(const string&display)=0;
virtual void buildos()=0;

};

class Macbookbuilder:public Builder
{
  public:
  Macbookbuilder():_compter(new MacBook()){}
  void buildboard(const string &board){
    _computer->serBoard(board);
      }
      void builddisplay(const string &display)
      {
       _computer->setdisplay(display);
      }
    void buildos()
    {
     _computer->setos();


    }
   


  private:
  shared_ptr<Computer>_computer;

};
class Director{
public:
     Director(Builder* builder):_builder(builder){}
void construct(const string &board,const string &display)
{
  _builder->buildboard(board);
  _builder->builddisplay(display); 
  _builder->buildos();
}
private:
shared_ptr<Builder>_builder;


}


